﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using BusinessComponents;
namespace WaterfrontLodge.WebForms.RoomTypeMgt
{
    public class RoomTypeNavigationController : System.Web.UI.Page
    {
        private Dictionary<string, string> navigator;
        private  string _currentPage;
        private RoomType _RoomTypeDetails;

        public string CurrentPage
        {
            get { return _currentPage; }
            set { _currentPage = value; }
        }

        public RoomType RoomTypeDetails
        {
            get { return _RoomTypeDetails; }
            set { _RoomTypeDetails = value; }
        }

        protected virtual void Page_Load(object sender, EventArgs e)
        {
           
        }
        public void PageLoad()
        {
            navigator = new Dictionary<string, string>();
            navigator.Add("RoomTypeAddEdit.aspx", "RoomTypeAddEdit1.aspx");
            navigator.Add("RoomTypeAddEdit1.aspx", "~/WebForms/Shared/RoomTypeView.aspx");

            if (Session["RoomTypeDetails"] == null)
            {
                RoomTypeDetails = new RoomType();
                Session["RoomTypeDetails"] = RoomTypeDetails;
            }
            else
                RoomTypeDetails = (RoomType)Session["RoomTypeDetails"];
        }
        public String NextPage()
        {
            if (_currentPage == "RoomTypeAddEdit1.aspx")
                Session["RoomTypeDetails"] = null;
           return (navigator[_currentPage]);
        }

    }
}